
pd<-paste(wd, "/Figures/Figures_Output/",sep="")


spg_unc<-read.csv("spg_unc_original.csv")[,1:60]


spgcf_unc<-read.csv("spg_unc_cfactual.csv")[,1:38]


spg<-read.csv("spg_original.csv")[,1:60]


spgcf<-read.csv("spg_cfactual.csv")[,1:38]






pdf(file=paste(pd,"spg_plot.pdf",sep=""), 6, 12)

par(mfrow=c(3,1))

par(mar=c(2,3,3,1))

par(oma=c(2,4.25,3,1))

plot(1972:2010,spg[1,22:60],lty=1,lwd=2,axes=F,xlim=c(1972,2010),type="n",xlab="",ylab="",ylim=c(-.06,-.015))


#mtext("Precision of Beliefs",2,line=2.5,cex=1.25)

grid()

lines(1972:2010,spg[1,22:60],lty=1,lwd=2)
lines(1973:2010,spgcf[1,],lty=2,lwd=2)


axis(2,seq(-.06,-.01,by=.01),labels=seq(-6,-1,by=1))


text(1985,-.036,"Truth")
text(1992,-.05,"Counterfactual")

mtext("Spain",3,font=2,cex=1)







plot(1972:2010,spg[2,22:60],lty=1,lwd=2,axes=F,xlim=c(1972,2010),type="n",xlab="",ylab="",ylim=c(-.04,0))


#mtext("Precision of Beliefs",2,line=2.5,cex=1.25)

grid()

lines(1972:2010,spg[2,22:60],lty=1,lwd=2)
lines(1973:2010,spgcf[2,],lty=2,lwd=2)


axis(2,seq(-.04,0,by=.01),labels=seq(-4,0,by=1))

mtext("Portugal",3,font=2,cex=1)





plot(1972:2010,spg[3,22:60],lty=1,lwd=2,axes=F,xlim=c(1972,2010),type="n",xlab="",ylab="")


#mtext("Precision of Beliefs",2,line=2.5,cex=1.25)

grid()

lines(1972:2010,spg[3,22:60],lty=1,lwd=2)
lines(1973:2010,spgcf[3,],lty=2,lwd=2)


axis(2,seq(-.05,-.02,by=.01),labels=seq(-5,-2,by=1))

mtext("Greece",3,font=2,cex=1)


axis(1,seq(1970,2010,by=5),line=.5)



mtext("Beliefs",3,font=2,cex=1.75,outer=T)

mtext(expression(bar(beta)^{D==1}-bar(beta)^{D==0}),2,line=2,outer=T)


dev.off()
